<?php
/**
 * Created by PhpStorm.
 * Muser: lvchy
 * Date: 2018/9/26
 * Time: 16:49
 */

namespace app\common\model;
use think\Model;


class Menu extends Model
{
// 设置完整的数据表（包含前缀）
    protected $table = 'sys_menu';

    public function parent(){
        return $this->belongsTo('Menu','parent_id','menu_id')
            ->field('menu_id,menu_name as parent_name')
            ->bind('parent_name');
    }

}